package com.gmt.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * @author John.zhang
 * @version Id: FileWebConfig, v 1.0 2020/11/10 18:52 ZhiYong Exp $
 */
//@Configuration
public class FileWebConfig extends WebMvcConfigurationSupport {

    @Override
    protected void addResourceHandlers(ResourceHandlerRegistry registry) {
        //用于访问静态目录，有可能没有引入到工程当中
        registry.addResourceHandler("").addResourceLocations("file:D:/");
        super.addResourceHandlers(registry);
    }
}
